package com.chenfan.mcn;

import com.chenfan.ccp.util.start.ApplicationContextUtil;
import com.chenfan.mcn.exception.EnhancedGlobalExceptionHandler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author lizhejin
 */
@EnableAsync(proxyTargetClass = true)
@EnableFeignClients("com.chenfan.*")
@EnableDiscoveryClient
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
@EnableTransactionManagement
@MapperScan("com.chenfan.**.dao.**")
@Import(EnhancedGlobalExceptionHandler.class)
public class McnApplication {

	public static void main(String[] args) {
		ApplicationContextUtil.run(args);
	}
}
